<aside class="lg-side">
  <div class="panel-heading tab-bg-dark-navy-blue okr-tab-head tab-right "></div>
  <div class="inbox-body mi-h8">
    <div class="row">
      <div class="col-lg-12">
        <section class="panel">
          <header class="panel-heading add-heading">
            项目变更信息
          </header>
          <div class="panel-body">
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">变更级别*</label>
              <div class="col-sm-10">
                <select class="form-control" id="crLv">
                  <option value="0">请选择</option>
                  <option value="3">高</option>
                  <option value="2">中</option>
                  <option value="1">低</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">变更类型*</label>
              <div class="col-sm-10">
                <select class="form-control" id="type">
                  <option value="">请选择</option>
                  <option value="进度和计划">进度和计划</option>
                  <option value="成员">成员</option>
                  <option value="商务">商务</option>
                  <option value="其他">其他</option>
                  <option value="1">运行中</option>
                  <option value="2">已关闭</option>
                  <option value="3">已完结</option>
                  <option value="4">已暂停</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">变更说明*</label>
              <div class="col-sm-10">
                <textarea class="form-control" onkeyup="this.value=this.value.replace(/(^\s+)|(\s+$)/g,'');" id="content" maxlength="120"
                  placeholder="字数限制(120字以内)"></textarea>
              </div>
            </div>
            <p class="default-buttons">
              <a href="javascript:void(0);" class="button-back btn btn-info" onclick="toBack()">返回</a>
              <a href="javascript:void(0);" class="button-next  btn btn-info submit">提交</a>
            </p>
          </div>
        </section>
      </div>
    </div>
  </div>
</aside>
<script>
  function toBack() {
    toLoadHtml(27);
  }

  $(".submit").on('click', function () {
    var crLv = $("#crLv").val();
    if (crLv == "0" ||crLv == "" || crLv == null || crLv == undefined) {
      layer.msg("变更级别不能为空！");
      return;
    }
    var type = $("#type").val();
    if (type == "" || type == null || type == undefined) {
      layer.msg("变更类型不能为空！");
      return;
    }
    var content = $("#content").val();
    if (content == "") {
      layer.msg("变更说明不能为空！");
      return;
    }
    $certusUtils.ajax("toAddCr", {
      "proId": proId,
      "content": content,
      "crLv": crLv,
      "type": type
    }, function (response) {
      layer.msg("添加成功", {
        "time": 500
      });
      toLoadHtml(27);
    })
  });
</script>